import express from "express";
const app = express();

app.get(
  "/",
  function (req, res, next) {
    console.log(11);
    next();
  },
  function (req, res, next) {
    console.log(22);
    next();
  }
);
app
  .route("/")
  .get(function (req, res, next) {
    console.log(1);
    next();
  })
  .get(function (req, res, next) {
    console.log(2);
    next();
  })
  .get(function (req, res) {
    res.end("get ok");
  })
  .post(function (req, res) {
    res.end("post ok");
  })
  .delete(function (req, res) {
    res.end("delete ok");
  });

app.listen(3000);
